<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    div {

      font-size: 18px;
      color: #fff;
      -webkit-text-stroke: 0.5px red;
    }
  </style>
</head>

<body>
  <script>
    function delMaxStr(str) {
      let map = new Map()
      let maxNum = 0
      let index = 0
      while (index < str.length) {
        let key = str[index]
        let val = map.get(key)
        if (val) {
          map.set(key, val + 1)
        } else {
          map.set(key, 1)
        }
        index++
      }
      map.forEach((value, key) => {
        maxNum = Math.max(value, maxNum)
      })
      map.forEach((value, key) => {
        if (value === maxNum) {
          str = str.replaceAll(key, '')
        }
      })
      return str
    }
    let str = 'abc'
    let result = delMaxStr(str)
    let str2 = 'abbc'
    let result1 = delMaxStr(str2)
    let str3 = 'abbdcvdgad'
    let result2 = delMaxStr(str3)
    console.log(result, result1, result2);
  </script>
  <div>Feed</div>
</body>

</html>